//
// Created by ancho on 2021/11/6.
//
#include <iostream>

using namespace std;
double eps = 1e-6;
int zero_flag(double k){
    /*
     * return 1 if k >0, -1 if k <0, 0 if 0.0.
     */
    if(k < -eps)
        return -1;
    return k >eps;
}

int main(){
   const int maxn = 300;
   double a[maxn],x;
   a[0]=0.0;
   int i;
   for(i=1;a[i-1] < 5.20;i++){
       a[i] = a[i-1] + 1.0/(double )(i+1);
//       cout<<a[i]<<"\t"<<i<<'\t';
   }
   cin >> x;
    while (zero_flag(x)) {
        int l=0,r=i,mid;
        while (l + 1 < r) {
            mid = (l+r)/2;
            if (a[mid] > x) {
                r = mid;
            }else{
                l=mid;
            }
        }
        cout<<r << " card(s)"<<endl;
        cin>>x;
    }
}

